-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support proxy environment for docker client #2424
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
After this pull request was patched, skopeo also worked fine with the proxy environment.
This does not even compile, so I can’t see how this could have possibly worked.
Also, per https://github.com/containers/image/blob/main/CONTRIBUTING.md#sign-your-prs :
Use your real name (sorry, no pseudonyms or anonymous contributions.)
@mtrmac I've fixed it. Please let me know if there is anything else I need to do. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this makes sense doing, then the http:
and https:
protocols should support proxies equally.
(Alternatively, AFAICS we don’t actually need to configure this manually: comparing https://github.com/docker/cli/blob/57a1180c52ad7633dcf2fe1515ec2601ffb01944/cli/context/docker/load.go#L85 and looking at the implementation, if WithHttpClient
is included before WithHost
, that triggers sockets.ConfigureTransport
and that sets this, along, with a few other options. But that’s undocumented and very nonobvious; it’s really only a confirmation that ProxyFromEnvironment
can be appropriate here.)
@PMExtra still working on this? |
I don't know what I should do. I think it's ready for merging. |
@mtrmac what would you like to see done? |
This only adds them to the former; add support for the latter. |
@mtrmac I'm not sure what you mean. If you set |
The |
This comment was marked as off-topic.
This comment was marked as off-topic.
That example does not reference the |
@mtrmac Now I finally understand what you meant, and I apologize for the previous misunderstanding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Code LGTM, please squash into one commit and rebase.
Signed-off-by: PENG MIN <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Proxy environment works fine with docker-cli:
But does not work with skopeo:
It's just an example, I need to copy image to the docker-daemon host in actual.
After this pull request was patched, skopeo also worked fine with the proxy environment.